#!/usr/bin/env python
# -*- coding:utf-8 -*-

import sys

from scpy.logger import get_logger
from xtls.mqwrapper import producer

reload(sys)
sys.setdefaultencoding("utf-8")
logger = get_logger(__file__)


@producer('10.117.29.191', '51job-company-id', logger=logger)
def insert_task():
    for cid in xrange(1, 3859721):
        yield {'companyId': cid}
        logger.info('now : %s' % cid)


if __name__ == '__main__':
    insert_task()
